package com.woniuxy.springboot08rabbitmq.simple;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queuesToDeclare =@Queue("queue1"))
public class SimpleCustomer {
    @RabbitHandler
    public void receiveMSG(String msg){
        System.out.println("消费者："+msg);
    }
}
